<?php

namespace app\controllers;

use service\rabbitmq\MqService;
use yii\web\Controller;

class TestController extends Controller
{

    /**
     * Displays about page.
     *
     * @return string
     */
    public function actionAbout()
    {
        $result = MqService::instance()->publish(
            "exchanges_1",
            "test1",
            json_encode(['test' => 1], JSON_UNESCAPED_UNICODE)
        );
        var_dump($result);
        exit;

        return $this->render('about');
    }
}
